<%--
  Created by IntelliJ IDEA.
  User: 86150
  Date: 2021/7/13
  Time: 16:05
  To change this template use File | Settings | File Templates.
--%>
<<%@ page language="java" contentType="text/html; charset=UTF-8"
          pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>编号生成</title>
    <!-- CSS -->
    <link rel="stylesheet" href="${mybasePath}assets/bootstrap/css/bootstrap.min.css">
    <jsp:include page="../include/headtag.jsp" />
    <!-- <link rel="stylesheet"
        href="http://fonts.googleapis.com/css?family=Roboto:400,100,300,500"> -->
    <link rel="stylesheet"
          href="assets/font-awesome/css/font-awesome.min.css">
    <link rel="stylesheet" href="assets/css/form-elements.css">
    <link rel="stylesheet" href="assets/css/style.css">
</head>
<body>
<jsp:include page="../include/head.jsp" />
<jsp:include page="../include/menu.jsp" />
<div id="page-wrapper" style="margin-top: 50px;">
    <div id="page-inner">
        <div class="row">
            <div class="col-md-12">
                <div class="text-left">
                    <a href="/index">首页</a>&nbsp;&gt;&nbsp;<a href="/codeGenerateIndex" class="acts CurrChnlCls">确认规则</a>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-md-12">
                <h3 class="text-left">编号生成&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <img src ="${pageContext.request.contextPath}/assets/img/functionImg/codegene.png"width="900px" height="90px" /></h3>
            </div>
        </div>
        <hr />
        <br />
        <!--------------------------------确定规则筛选条件框------------------------------------->
        <div class="container-fluid">
            <form action="/inputKey3" class="col-sm-12 select-info table-bordered" method="post">
                <table class="table-bordered">
                    <br />
                    <tr>
                        <div class="row">
                            <div class="form-horizontal">
                                <div class="col-md-1">
                                    <label >规则查询 </label>
                                </div>
                                <div class="col-md-4">
                                    <input id="rule_word" class="form-control" name="rule_word" value="${rule_word_result}" placeholder="请填写您要搜索的编码规则名称">
                                </div>
                                <div class="col-md-1">
                                    <button  type="submit"  name="searchrule"  >搜索</button>
                                </div>
                            </div>
                        </div>
                    </tr>
                    <br />
                </table>
            </form>
            <!--------------------------------规则显示条件框------------------------------------->
            <form class="col-sm-12 select-info table-bordered" method="post">
                <table class="table-bordered">
                    <br />
                        <div class="row">
                            <div class="form-horizontal">
                                <div class="col-md-2">
                                    <label for="intro">详细描述 </label>
                                </div>
                                <div class="col-md-10">
                                    <input class="form-control" value="${rule.codeRuleIntro}" id="intro" type="text"  style="resize: none; LINE-HEIGHT:18px;padding: 2px;width:100%;height:100px;max-width:100%;max-height: 100px;" readonly/>
                                </div>
                            </div>
                        </div>
                    <br />
                </table>
            </form>
            <!--------------------------------规则确认------------------------------------->
            <br />
            <div class="col-md-3"></div>
            <div class="col-md-6">
                <button  onclick="redir_to_next(${coderuleid})"  name="confirm">确认规则</button>
            </div>
            <hr />
            <br />
        </div>
    </div>
</div>
</body>
<!-- Javascript -->
<script src="assets/bootstrap/js/bootstrap.min.js"></script>
<script src="assets/bootstrap/js/jquery.min.js"></script>
<script src="assets/js/jquery.backstretch.min.js"></script>

<!--------------------------------跳转页面------------------------------------->
<script type="text/javascript">
    function redir_to_next(id) {
        var titleVal = "${coderuleshow}";
        if(titleVal=="" || titleVal==null)
        {
            alert("规则未确定，请先确定规则！");
            return;
        }
        window.location.href = "/tocodeGenerateInfo?id="+id;
    }

      // function isExisttt() {
      //  var titleVal = $("input[name=rule_word]").val();
      //  alert(titleVal);
      //  if(titleVal=="" || titleVal==null)
      //  {
      //      alert("查询标识为空，请输入！");
      //  }
      // return;
      // }
        $(document).ready(function (){
            var errorString="${error}";
            if(errorString!="")
            { alert(errorString);}
        })

</script>
</html>
